package com.xiaomi.eco.utils;

public class EcoServiceQualityAlarm {

    public static final int CONNECTTIMEOUT = 1600000;

    public static final int READTIMEOUT = 1600000;
    public static final String AUTHORIZATION = "Authorization";

    public static final String BEARER = "Bearer ";

    public static final String APPLICATION = "applicaTionId";

    public static final String BODY = "body";

    public static final String URL = "url";

    public static final String CODE = "code";
    public static final String SUCCESS = "success";

    public static final String TASK = "task";

    public static final String GUID = "guid";

    public static final String MOBILE_USERS = "mobile_users";

    public static final String tenantAccessToken = "tenant_access_token";

    public static final String OPEN_ID = "open_id";

    public static final String expire = "expire";
    public static String userIdUrl = "https://open.f.mioffice.cn/open-apis/user/v1/batch_get_id?mobiles=";

    public static String tenantAccessTokenUrl = "https://open.f.mioffice.cn/open-apis/auth/v3/tenant_access_token/internal";

    public static String DATA = "data";
    public static String MSG = "msg";

    public static final String overDueUrl = "https://open.f.mioffice.cn/open-apis/im/v1/messages?receive_id_type=user_id";
    public static final double p95timeNum = 47;

    public static final double p99TimeNum = 49;

    public static final double availabilityNum = 99.95;

    public static final double timeOnsumingP95 = 500;

    public static final double timeOnsumingP99 = 800;

    public static final String COMPLETEING = "优化中";

    public static final String principalPhone = "principalPhone";

    public static final String COMPLETED = "已完成";


    public static final String availabilityIsNotUpToPar = "不达标";

    public static final String availabilityIsNotCommom = "不达标接口优化-";

    public static final String slowDownCommom = "慢接口优化-";

    public static final String slowInterface = "慢接口";

    public static String weeklySummaryDanger = "{\n" +
            "    \"msg_type\": \"interactive\",\n" +
            "    \"card\": " +
            "{\n" +
            "  \"config\": {\n" +
            "    \"wide_screen_mode\": true\n" +
            "  },\n" +
            "  \"elements\": [\n" +
            "    {\n" +
            "      \"tag\": \"column_set\",\n" +
            "      \"flex_mode\": \"none\",\n" +
            "      \"background_style\": \"default\",\n" +
            "      \"columns\": [\n" +
            "        {\n" +
            "          \"tag\": \"column\",\n" +
            "          \"width\": \"weighted\",\n" +
            "          \"weight\": 1,\n" +
            "          \"vertical_align\": \"top\",\n" +
            "          \"elements\": [\n" +
            "            {\n" +
            "              \"tag\": \"column_set\",\n" +
            "              \"flex_mode\": \"none\",\n" +
            "              \"background_style\": \"grey\",\n" +
            "              \"columns\": [\n" +
            "                {\n" +
            "                  \"tag\": \"column\",\n" +
            "                  \"width\": \"weighted\",\n" +
            "                  \"weight\": 1,\n" +
            "                  \"vertical_align\": \"top\",\n" +
            "                  \"elements\": [\n" +
            "                    {\n" +
            " \"tag\": \"markdown\",\n" +
            "                      \"content\": \"<font color=red><b>**%s**</font>\\n**接口可用性不达标**\\n\\n\",\n" +
            "                      \"text_align\": \"center\""+
            "                    }" +
            "                  ]\n" +
            "                }\n" +
            "              ]\n" +
            "            }\n" +
            "          ]\n" +
            "        },\n" +
            "        {\n" +
            "          \"tag\": \"column\",\n" +
            "          \"width\": \"weighted\",\n" +
            "          \"weight\": 1,\n" +
            "          \"vertical_align\": \"top\",\n" +
            "          \"elements\": [\n" +
            "            {\n" +
            "              \"tag\": \"column_set\",\n" +
            "              \"flex_mode\": \"none\",\n" +
            "              \"background_style\": \"grey\",\n" +
            "              \"columns\": [\n" +
            "                {\n" +
            "                  \"tag\": \"column\",\n" +
            "                  \"width\": \"weighted\",\n" +
            "                  \"weight\": 1,\n" +
            "                  \"vertical_align\": \"top\",\n" +
            "                  \"elements\": [\n" +
            "                    {\n" +
                    " \"tag\": \"markdown\",\n" +
            "                      \"content\": \"<font color=red><b>**%s**</font>\\n**慢接口不达标**\\n\\n\",\n" +
            "                      \"text_align\": \"center\""+
            "                    }\n" +
            "                  ]\n" +
            "                }\n" +
            "              ]\n" +
            "            }\n" +
            "          ]\n" +
            "        },\n" +
            "        {\n" +
            "          \"tag\": \"column\",\n" +
            "          \"width\": \"weighted\",\n" +
            "          \"weight\": 1,\n" +
            "          \"vertical_align\": \"top\",\n" +
            "          \"elements\": [\n" +
            "            {\n" +
            "              \"tag\": \"column_set\",\n" +
            "              \"flex_mode\": \"none\",\n" +
            "              \"background_style\": \"grey\",\n" +
            "              \"columns\": [\n" +
            "                {\n" +
            "                  \"tag\": \"column\",\n" +
            "                  \"width\": \"weighted\",\n" +
            "                  \"weight\": 1,\n" +
            "                  \"vertical_align\": \"top\",\n" +
            "                  \"elements\": [\n" +
            "                    {\n" +
                    " \"tag\": \"markdown\",\n" +
            "                      \"content\": \"<font color=%s><b>**%s**</font>\\n**最近7天可用性**\\n\\n\",\n" +
            "                      \"text_align\": \"center\""+
            "                    }\n" +
            "                  ]\n" +
            "                }\n" +
            "              ]\n" +
            "            }\n" +
            "          ]\n" +
            "        }\n" +
            "      ]\n" +
            "    },\n" +
            "    {\n" +
            "      \"tag\": \"hr\"\n" +
            "    },\n" +
            "    {\n" +
            "      \"tag\": \"div\",\n" +
            "      \"fields\": [\n" +
            "        {\n" +
            "          \"is_short\": true,\n" +
            "          \"text\": {\n" +
            "            \"tag\": \"lark_md\",\n" +
            "            \"content\": \"**              待办任务 <font color=red>%s</font>**\\n\"\n" +
            "          }\n" +
            "        },\n" +
            "        {\n" +
            "          \"is_short\": true,\n" +
            "          \"text\": {\n" +
            "            \"tag\": \"lark_md\",\n" +
            "            \"content\": \"**       逾期任务 <font color=%s>%s</font>**\\n\"\n" +
            "          }\n" +
            "        }\n" +
            "      ]\n" +
            "    },\n" +
            "    {\n" +
            "      \"tag\": \"hr\"\n" +
            "    },\n" +
            "    {\n" +
            "      \"tag\": \"div\",\n" +
            "      \"text\": {\n" +
            "        \"content\": \"\uD83D\uDCA1 请注意:任务逾期将会影响季度质量考核，请合理安排时间处理\",\n" +
            "        \"tag\": \"lark_md\"\n" +
            "      }\n" +
            "    },\n" +
            "    {\n" +
            "      \"tag\": \"action\",\n" +
            "      \"actions\": [\n" +
            "        {\n" +
            "          \"tag\": \"button\",\n" +
            "          \"text\": {\n" +
            "            \"tag\": \"plain_text\",\n" +
            "            \"content\": \"可用性看板\"\n" +
            "          },\n" +
            "          \"type\": \"primary\",\n" +
            "          \"multi_url\": {\n" +
            "            \"url\": \"https://dt.mi.com/whale/?aegis=c7d4991fa2c5ded458&pid=10099791#/data-bi/dashboard/96790?projectId=10099791\",\n" +
            "            \"android_url\": \"\",\n" +
            "            \"ios_url\": \"\",\n" +
            "            \"pc_url\": \"\"\n" +
            "          }\n" +
            "        },\n" +
            "        {\n" +
            "          \"tag\": \"button\",\n" +
            "          \"text\": {\n" +
            "            \"tag\": \"plain_text\",\n" +
            "            \"content\": \"任务详情\"\n" +
            "          },\n" +
            "          \"type\": \"primary\",\n" +
            "          \"multi_url\": {\n" +
            "            \"url\": \"%s\",\n" +
            "            \"android_url\": \"\",\n" +
            "            \"ios_url\": \"\",\n" +
            "            \"pc_url\": \"\"\n" +
            "          }\n" +
            "        }\n" +
            "      ]\n" +
            "    }\n" +
            "  ],\n" +
            "  \"header\": {\n" +
            "    \"template\": \"red\",\n" +
            "    \"title\": {\n" +
            "      \"content\": \"%s\",\n" +
            "      \"tag\": \"plain_text\"\n" +
            "    }\n" +
            "  }\n" +
            "}\n" +
            "  }";

    public static String weeklySummaryHealth = "{\n" +
            "    \"msg_type\": \"interactive\",\n" +
            "    \"card\": " +
            "{\n" +
            "  \"config\": {\n" +
            "    \"wide_screen_mode\": true\n" +
            "  },\n" +
            "  \"elements\": [\n" +
            "    {\n" +
            "      \"tag\": \"column_set\",\n" +
            "      \"flex_mode\": \"none\",\n" +
            "      \"background_style\": \"default\",\n" +
            "      \"columns\": [\n" +
            "        {\n" +
            "          \"tag\": \"column\",\n" +
            "          \"width\": \"weighted\",\n" +
            "          \"weight\": 1,\n" +
            "          \"vertical_align\": \"top\",\n" +
            "          \"elements\": [\n" +
            "            {\n" +
            "              \"tag\": \"column_set\",\n" +
            "              \"flex_mode\": \"none\",\n" +
            "              \"background_style\": \"grey\",\n" +
            "              \"columns\": [\n" +
            "                {\n" +
            "                  \"tag\": \"column\",\n" +
            "                  \"width\": \"weighted\",\n" +
            "                  \"weight\": 1,\n" +
            "                  \"vertical_align\": \"top\",\n" +
            "                  \"elements\": [\n" +
            "                    {\n" +
            " \"tag\": \"markdown\",\n" +
            "                      \"content\": \"<font color=green><b>**%s**</font>\\n**接口可用性不达标**\\n\\n\",\n" +
            "                      \"text_align\": \"center\""+
            "                    }\n" +
            "                  ]\n" +
            "                }\n" +
            "              ]\n" +
            "            }\n" +
            "          ]\n" +
            "        },\n" +
            "        {\n" +
            "          \"tag\": \"column\",\n" +
            "          \"width\": \"weighted\",\n" +
            "          \"weight\": 1,\n" +
            "          \"vertical_align\": \"top\",\n" +
            "          \"elements\": [\n" +
            "            {\n" +
            "              \"tag\": \"column_set\",\n" +
            "              \"flex_mode\": \"none\",\n" +
            "              \"background_style\": \"grey\",\n" +
            "              \"columns\": [\n" +
            "                {\n" +
            "                  \"tag\": \"column\",\n" +
            "                  \"width\": \"weighted\",\n" +
            "                  \"weight\": 1,\n" +
            "                  \"vertical_align\": \"top\",\n" +
            "                  \"elements\": [\n" +
            "                    {\n" +
            " \"tag\": \"markdown\",\n" +
            "                      \"content\": \"<font color=green><b>**%s**</font>\\n**慢接口不达标**\\n\\n\",\n" +
            "                      \"text_align\": \"center\""+
            "                    }\n" +
            "                  ]\n" +
            "                }\n" +
            "              ]\n" +
            "            }\n" +
            "          ]\n" +
            "        },\n" +
            "        {\n" +
            "          \"tag\": \"column\",\n" +
            "          \"width\": \"weighted\",\n" +
            "          \"weight\": 1,\n" +
            "          \"vertical_align\": \"top\",\n" +
            "          \"elements\": [\n" +
            "            {\n" +
            "              \"tag\": \"column_set\",\n" +
            "              \"flex_mode\": \"none\",\n" +
            "              \"background_style\": \"grey\",\n" +
            "              \"columns\": [\n" +
            "                {\n" +
            "                  \"tag\": \"column\",\n" +
            "                  \"width\": \"weighted\",\n" +
            "                  \"weight\": 1,\n" +
            "                  \"vertical_align\": \"top\",\n" +
            "                  \"elements\": [\n" +
            "                    {\n" +
            " \"tag\": \"markdown\",\n" +
            "                      \"content\": \"<font color=green><b>**%s**</font>\\n**最近7天可用性**\\n\\n\",\n" +
            "                      \"text_align\": \"center\""+
            "                    }\n" +
            "                  ]\n" +
            "                }\n" +
            "              ]\n" +
            "            }\n" +
            "          ]\n" +
            "        }\n" +
            "      ]\n" +
            "    },\n" +
            "    {\n" +
            "      \"tag\": \"hr\"\n" +
            "    },\n" +
            "    {\n" +
            "      \"tag\": \"div\",\n" +
            "      \"fields\": [\n" +
            "        {\n" +
            "          \"is_short\": true,\n" +
            "          \"text\": {\n" +
            "            \"tag\": \"lark_md\",\n" +
            "            \"content\": \"**              待办任务 <font color=green>%s</font>**\\n\"\n" +
            "          }\n" +
            "        }," +
            "        {\n" +
            "          \"is_short\": true,\n" +
            "          \"text\": {\n" +
            "            \"tag\": \"lark_md\",\n" +
            "            \"content\": \"**        逾期任务 <font color=green>%s</font>**\\n\"\n" +
            "          }" +
            "        }\n" +
            "      ]\n" +
            "    },\n" +
            "    {\n" +
            "      \"tag\": \"hr\"\n" +
            "    },\n" +
            "    {\n" +
            "      \"tag\": \"div\",\n" +
            "      \"text\": {\n" +
            "        \"content\": \"\uD83C\uDFC6 云服务质量状况良好，请继续保持\",\n" +
            "        \"tag\": \"lark_md\"\n" +
            "      }\n" +
            "    },\n" +
            "    {\n" +
            "      \"tag\": \"action\",\n" +
            "      \"actions\": [\n" +
            "        {\n" +
            "          \"tag\": \"button\",\n" +
            "          \"text\": {\n" +
            "            \"tag\": \"plain_text\",\n" +
            "            \"content\": \"可用性看板\"\n" +
            "          },\n" +
            "          \"type\": \"primary\",\n" +
            "          \"multi_url\": {\n" +
            "            \"url\": \"https://dt.mi.com/whale/?aegis=c7d4991fa2c5ded458&pid=10099791#/data-bi/dashboard/96790?projectId=10099791\",\n" +
            "            \"android_url\": \"\",\n" +
            "            \"ios_url\": \"\",\n" +
            "            \"pc_url\": \"\"\n" +
            "          }\n" +
            "        },\n" +
            "        {\n" +
            "          \"tag\": \"button\",\n" +
            "          \"text\": {\n" +
            "            \"tag\": \"plain_text\",\n" +
            "            \"content\": \"任务详情\"\n" +
            "          },\n" +
            "          \"type\": \"primary\",\n" +
            "          \"multi_url\": {\n" +
            "            \"url\": \"%s\",\n" +
            "            \"android_url\": \"\",\n" +
            "            \"ios_url\": \"\",\n" +
            "            \"pc_url\": \"\"\n" +
            "          }\n" +
            "        }\n" +
            "      ]\n" +
            "    }\n" +
            "  ],\n" +
            "  \"header\": {\n" +
            "    \"template\": \"green\",\n" +
            "    \"title\": {\n" +
            "      \"content\": \"【%s】 云服务质量概览\",\n" +
            "      \"tag\": \"plain_text\"\n" +
            "    }\n" +
            "  }\n" +
            "}\n" +
            "  }";


    public final static int daysBetween = -2;

    public static String overdueReminderTemp = "{\n" +
            "\t\"receive_id\": \"%s\",\n" +
            "\t\"content\": \"{\\\"elements\\\": [{\\\"tag\\\": \\\"markdown\\\",\\\"content\\\": \\\"**%s任务即将逾期，请尽快优化**\\\\n优化任务如需延期，需向对接人说明原因及延期实现\\\\n\\\\n\\\\n\\\\n\\\",\\\"text_align\\\": \\\"center\\\"},{\\\"tag\\\": \\\"action\\\",\\\"actions\\\": [{\\\"tag\\\": \\\"button\\\",\\\"text\\\": {\\\"tag\\\": \\\"plain_text\\\",\\\"content\\\": \\\"任务详情\\\"},\\\"type\\\": \\\"primary\\\",\\\"multi_url\\\": {\\\"url\\\": \\\"%s\\\",\\\"pc_url\\\": \\\"\\\",\\\"android_url\\\": \\\"\\\",\\\"ios_url\\\": \\\"\\\"}}]}],\\\"header\\\": {\\\"title\\\": {\\\"content\\\": \\\"%s即将逾期预警\\\",\\\"tag\\\": \\\"plain_text\\\"},\\\"template\\\": \\\"yellow\\\"}}\",\n" + "\t\"msg_type\": \"interactive\"\n" +
            "}";

    public static String overDueAlarmTemp = "{\n" +
            "\t\"receive_id\": \"%s\",\n" +
            "\t\"content\": \"{\\\"elements\\\": [{\\\"tag\\\": \\\"markdown\\\",\\\"content\\\": \\\"**%s任务已逾期%s天**\\\\n优化任务如需延期，需向对接人说明原因以及延期时限\\\\n\\\\n\\\\n\\\\n\\\",\\\"text_align\\\": \\\"center\\\"},{\\\"tag\\\": \\\"action\\\",\\\"actions\\\": [{\\\"tag\\\": \\\"button\\\",\\\"text\\\": {\\\"tag\\\": \\\"plain_text\\\",\\\"content\\\": \\\"任务详情\\\"},\\\"type\\\": \\\"primary\\\",\\\"multi_url\\\": {\\\"url\\\": \\\"%s\\\",\\\"pc_url\\\": \\\"\\\",\\\"android_url\\\": \\\"\\\",\\\"ios_url\\\": \\\"\\\"}}]}],\\\"header\\\": {\\\"title\\\": {\\\"content\\\": \\\"%s逾期提醒\\\",\\\"tag\\\": \\\"plain_text\\\"},\\\"template\\\": \\\"red\\\"}}\",\n" +
            "\t\"msg_type\": \"interactive\"\n" +
            "}\n";

    public static String requestTenantAccessToken = "{\n" +
            "    \"app_id\": \"%s\",\n" +
            "    \"app_secret\": \"%s\"\n" +
            "}";

    public static String creqateTaskParam = "{\n" +
            "    \"summary\": \"%s\",\n" +
            "    \"description\": \"%s\",\n" +
            "    \"due\": {\n" +
            "        \"timestamp\": \"%s\",\n" +
            "        \"is_all_day\": true\n" +
            "    },\n" +
            "    \"completed_at\": \"0\",\n" +
            "    \"members\": [\n" +
            "        {\n" +
            "            \"id\": \"%s\",\n" +
            "            \"type\": \"user\",\n" +
            "            \"role\": \"assignee\"\n" +
            "        },\n" +
            "        {\n" +
            "            \"id\": \"%s\",\n" +
            "            \"type\": \"user\",\n" +
            "            \"role\": \"follower\"\n" +
            "        }\n" +
            "    ],\n" +
            "  \"tasklists\": [\n" +
            "        {\n" +
            "            \"tasklist_guid\": \"%s\",\n" +
            "            \"section_guid\": \"%s\"\n" +
            "        }\n" +
            "    ],"+
            "    \"client_token\": \"%s\",\n" +
            "    \"start\": {\n" +
            "        \"timestamp\": \"%s\",\n" +
            "        \"is_all_day\": true\n" +
            "    },\n" +
            "    \"reminders\": [\n" +
            "        {\n" +
            "            \"relative_fire_minute\": 720\n" +
            "        }\n" +
            "    ],\n" +
            "    \"mode\": 1,\n" +
            "    \"is_milestone\": false\n" +
            "}";

    public static String searchTaskUrl = "https://open.f.mioffice.cn/open-apis/task/v2/tasks/%s?user_id_type=open_id";

    public static String insertTaskFeishuUrl = "https://open.f.mioffice.cn/open-apis/task/v2/tasks?user_id_type=user_id";

    public static String delTaskUrl = "https://open.f.mioffice.cn/open-apis/task/v2/tasks/%s?user_id_type=open_id";

    public static String patchTaskUrl = "https://open.f.mioffice.cn/open-apis/task/v2/tasks/%s";

}
